<section class="content-header">
    <h1>
        Danh sách người dùng
        <small>Sửa đổi</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="<?php echo DOMAINAD ?>" ><i class="fa fa-dashboard"></i> Trang chủ</a></li>
        <li><a href="<?php echo DOMAINAD ?>auser" > Danh sách người dùng</a></li>
        <li class="active"> Sửa đổi</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box-header">
                <div class="box-tools">
                    <div class="input-group">
                        <div class="input-group-btn">
                            <a href="<?php echo DOMAINAD; ?>auser/add" class="btn btn-sm btn-success" ><i class="fa fa-fw fa-plus-circle"></i> Cập nhật</a>
                            <a href="#messages" rel="modal" class="btn btn-sm btn-success" ><i class="fa fa-fw fa-question"></i> Trợ giúp </a>
                            <a href="<?php echo DOMAINAD; ?>home" class="btn btn-sm btn-success" ><i class="fa fa-fw fa-times-circle"></i> Đóng </a>
                        </div>
                    </div>
                </div>
            </div><!-- /.box-header -->

            <div class="box">
                <!-- form start -->
                <?php echo $this->Form->create(null, array('url' => DOMAINAD . 'auser/edit', 'type' => 'post', 'enctype' => 'multipart/form-data', 'name' => 'image')); ?>
                <div class="box-body">
                    <?php $flash = $this->Session->flash();
                    if(strlen($flash) > 45) {
                        ?>
                        <div class="alert alert-warning alert-dismissablee">
                            <i class="fa fa-warning"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <?php echo $flash?>
                        </div>
                    <?php }?>
                    <div class="form-group">
                        <label for="UserUsername">Tên đăng nhập</label>
                        <?php echo $this->Form->input('User.username', array('label' => '', 'class' => 'form-control')); ?>
                    </div>

                    <div class="form-group">
                        <label for="UserFullname">Tên đầy đủ</label>
                        <?php echo $this->Form->input('User.fullname', array('label' => '', 'class' => 'form-control')); ?>
                    </div>

                    <div class="form-group">
                        <label for="UserPassword">Mật khẩu</label>
                        <?php echo $this->Form->input('User.password', array('type'=>'password', 'label' => '', 'class' => 'form-control')); ?>
                    </div>

                    <div class="form-group">
                        <label for="UserRepassword">Xác nhận mật khẩu</label>
                        <?php echo $this->Form->input('User.repassword', array('type'=>'password', 'label' => '', 'class' => 'form-control')); ?>
                    </div>

                    <div class="form-group">
                        <label for="exampleInputEmail1">Hình đại diện</label>
                        <div id="images_chose">
                            <img src="/admin/timthumb.php?src=<?php echo $this->data['User']['avatar'];?>&amp;h=100&amp;w=100&amp;zc=1" />
                        </div><!--end #images_chose-->
                        <?php echo $this->Form->input('User.avatar',array('label'=>false, 'class'=>'form-control image-input datepicker','id' => 'xFilePath','maxlength'=>'255'));?>
                        <input type="button" value="Chọn ảnh" onclick="BrowseServer();" class="button btn btn-sm btn-default"/>
                        <?php echo $this->Form->input('ProductCategory.id',array('type'=>'hidden'));?>
                    </div>

                    <div class="form-group">
                        <label>Trang thái: </label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <?php
                        echo $this->Form->radio(
                            'User.status',
                            array(0=>'&nbsp;&nbsp;Chưa active &nbsp;&nbsp;&nbsp;&nbsp;', 1=>'&nbsp;&nbsp;Active'),
                            array('legend'=>false, 'style'=>'float: left; cursor: pointer;', 'value'=>1)
                        );
                        ?>
                    </div>
                </div><!-- /.box-body -->

                <div class="box-footer">
                    <a href="javascript:void(0);" onclick="javascript:document.image.submit();" class="btn btn-primary"> <span class="icon-32-save"></span> Lưu </a>
                    <a href="javascript:void(0);" class="btn btn-primary" onclick="javascript:document.image.reset();"> <span class="icon-32-refresh"> </span> Làm mới </a>
                    <a href="#messages" rel="modal" class="btn btn-primary"> <span class="icon-32-help"></span> Trợ giúp </a>
                    <a href="<?php echo DOMAINAD ?>auser" class="btn btn-primary"> <span class="icon-32-cancel"></span> Hủy </a>
                </div>
                <?php echo $this->Form->end(); ?>
            </div>
        </div>
    </div>
</section><!-- /.content -->